Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Acceptor host and port #42

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Acceptor host and port #42

wants to merge 3 commits into from

Conversation

iconara
Copy link
Owner

@iconara iconara commented Apr 28, 2016

Add #host and #port to Ione::Io::Acceptor so that you can find out the host and port that the server runs on when you specify '0.0.0.0' and/or 0 as host and port.

These values are now also the default values so that you can do reactor.bind to start a server that listens to any interface and an available port.

iconara added 3 commits April 29, 2016 08:37
This is useful when you want to bind to any available port.

Also make IoReactor#bind default to 0.0.0.0 and 0 so that binding without parameters binds to any available port on any interface. Since you now can easily determine which this is there's no reason to require the parameters.
So that you can figure out which interface and port the connection is using.
@iconara iconara force-pushed the acceptor-host-and-port branch from 395d54e to f63e459 Compare April 29, 2016 06:37
@coveralls
Copy link

coveralls commented Apr 29, 2016

Coverage Status

Coverage decreased (-0.4%) to 98.783% when pulling f63e459 on acceptor-host-and-port into fe3fdd2 on master.

@iconara
Copy link
Owner Author

iconara commented May 10, 2016

The SSL part doesn't work.

Also there's a bug in JRuby 1.7.x where Addrinfo#ip_unpack returns the wrong thing for IPv6 addresses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants